// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   Log4JInit.java

package com.vandagroup.common.init;

import com.vandagroup.common.util.LogUtil;
import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.apache.log4j.Logger;

public class Log4JInit extends HttpServlet
{

    private static String logFilePath = System.getProperty("user.dir") + System.getProperty("file.separator");

    public Log4JInit()
    {
    }

    public void init()
        throws ServletException
    {
        try
        {
            String tmpLogFilePath = getServletContext().getRealPath("/WEB-INF/logs");
            if(tmpLogFilePath != null)
                logFilePath = tmpLogFilePath;
            LogUtil.getLogger(this).info("***********************");
            LogUtil.getLogger(this).info("SYSTEM STARTED!");
            LogUtil.getLogger(this).info("***********************");
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }

    public void doGet(HttpServletRequest httpservletrequest1, HttpServletResponse httpservletresponse1)
        throws IOException, ServletException
    {
    }

    public void doPost(HttpServletRequest httpservletrequest1, HttpServletResponse httpservletresponse1)
        throws IOException, ServletException
    {
    }

    public static String getLogFilePath()
    {
        return logFilePath;
    }

}
